<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
  <meta name="theme-color" content="#222">
  <meta name="generator" content="Hexo 5.4.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

  <link rel="stylesheet" href="/css/main.css">



  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.2/css/all.min.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css">

  <script class="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {
      "hostname": "holidaypenguin.gitee.io",
      "root": "/",
      "images": "/images",
      "scheme": "Mist",
      "version": "8.2.2",
      "exturl": false,
      "sidebar": {
        "position": "right",
        "display": "always",
        "padding": 18,
        "offset": 12
      },
      "copycode": true,
      "bookmark": {
        "enable": false,
        "color": "#222",
        "save": "auto"
      },
      "fancybox": false,
      "mediumzoom": false,
      "lazyload": false,
      "pangu": false,
      "comments": {
        "style": "tabs",
        "active": null,
        "storage": true,
        "lazyload": false,
        "nav": null
      },
      "motion": {
        "enable": true,
        "async": true,
        "transition": {
          "post_block": "fadeIn",
          "post_header": "fadeInDown",
          "post_body": "fadeInDown",
          "coll_header": "fadeInLeft",
          "sidebar": "slideUpIn"
        }
      },
      "prism": false,
      "i18n": {
        "placeholder": "搜索...",
        "empty": "没有找到任何搜索结果：${query}",
        "hits_time": "找到 ${hits} 个搜索结果（用时 ${time} 毫秒）",
        "hits": "找到 ${hits} 个搜索结果"
      },
      "path": "/search.xml",
      "localsearch": {
        "enable": true,
        "trigger": "auto",
        "top_n_per_article": 1,
        "unescape": false,
        "preload": false
      }
    };
  </script>
  <meta property="og:type" content="article">
  <meta property="og:title" content="IDE-Sublime lint-JSHint 配置选项">
  <meta property="og:url" content="https://holidaypenguin.gitee.io/blob/2017-03-13-ide-sublime-lint-jshint-configuration-options/index.html">
  <meta property="og:site_name" content="HolidayPenguin">
  <meta property="og:locale" content="zh_CN">
  <meta property="article:published_time" content="2017-03-13T10:05:58.000Z">
  <meta property="article:modified_time" content="2017-03-13T10:05:58.000Z">
  <meta property="article:author" content="holidaypenguin">
  <meta property="article:tag" content="IDE">
  <meta property="article:tag" content="Sublime">
  <meta property="article:tag" content="工具">
  <meta name="twitter:card" content="summary">


  <link rel="canonical" href="https://holidaypenguin.gitee.io/blob/2017-03-13-ide-sublime-lint-jshint-configuration-options/">


  <script class="page-configurations">
    // https://hexo.io/docs/variables.html
    CONFIG.page = {
      sidebar: "",
      isHome: false,
      isPost: true,
      lang: 'zh-CN'
    };
  </script>
  <title>IDE-Sublime lint-JSHint 配置选项 | HolidayPenguin</title>





  <noscript>
    <style>
      body {
        margin-top: 2rem;
      }

      .use-motion .menu-item,
      .use-motion .sidebar,
      .use-motion .post-block,
      .use-motion .pagination,
      .use-motion .comments,
      .use-motion .post-header,
      .use-motion .post-body,
      .use-motion .collection-header {
        visibility: visible;
      }

      .use-motion .header,
      .use-motion .site-brand-container .toggle,
      .use-motion .footer {
        opacity: initial;
      }

      .use-motion .site-title,
      .use-motion .site-subtitle,
      .use-motion .custom-logo-image {
        opacity: initial;
        top: initial;
      }

      .use-motion .logo-line {
        transform: scaleX(1);
      }

      .search-pop-overlay,
      .sidebar-nav {
        display: none;
      }

      .sidebar-panel {
        display: block;
      }
    </style>
  </noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner">
        <div class="site-brand-container">
          <div class="site-nav-toggle">
            <div class="toggle" aria-label="切换导航栏" role="button">
              <span class="toggle-line"></span>
              <span class="toggle-line"></span>
              <span class="toggle-line"></span>
            </div>
          </div>

          <div class="site-meta">

            <a href="/" class="brand" rel="start">
              <i class="logo-line"></i>
              <h1 class="site-title">HolidayPenguin</h1>
              <i class="logo-line"></i>
            </a>
          </div>

          <div class="site-nav-right">
            <div class="toggle popup-trigger">
              <i class="fa fa-search fa-fw fa-lg"></i>
            </div>
          </div>
        </div>



        <nav class="site-nav">
          <ul class="main-menu menu">
            <li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li>
            <li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a></li>
            <li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li>
            <li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li>
            <li class="menu-item menu-item-search">
              <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
              </a>
            </li>
          </ul>
        </nav>



        <div class="search-pop-overlay">
          <div class="popup search-popup">
            <div class="search-header">
              <span class="search-icon">
                <i class="fa fa-search"></i>
              </span>
              <div class="search-input-container">
                <input autocomplete="off" autocapitalize="off" maxlength="80" placeholder="搜索..." spellcheck="false" type="search" class="search-input">
              </div>
              <span class="popup-btn-close" role="button">
                <i class="fa fa-times-circle"></i>
              </span>
            </div>
            <div class="search-result-container no-result">
              <div class="search-result-icon">
                <i class="fa fa-spinner fa-pulse fa-5x"></i>
              </div>
            </div>

          </div>
        </div>

      </div>


      <div class="toggle sidebar-toggle" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
      </div>

      <aside class="sidebar">

        <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
          <ul class="sidebar-nav">
            <li class="sidebar-nav-toc">
              文章目录
            </li>
            <li class="sidebar-nav-overview">
              站点概览
            </li>
          </ul>

          <div class="sidebar-panel-container">
            <!--noindex-->
            <div class="post-toc-wrap sidebar-panel">
              <div class="post-toc animated">
                <ol class="nav">
                  <li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%BC%BA%E5%88%B6%E6%89%A7%E8%A1%8C%E9%80%89%E9%A1%B9"><span class="nav-number">1.</span> <span class="nav-text">强制执行选项</span></a>
                    <ol class="nav-child">
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#bitwise"><span class="nav-number">1.1.</span> <span class="nav-text">bitwise</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#camelcase"><span class="nav-number">1.2.</span> <span class="nav-text">camelcase</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#curly"><span class="nav-number">1.3.</span> <span class="nav-text">curly</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#enforceall"><span class="nav-number">1.4.</span> <span class="nav-text">enforceall</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#eqeqeq"><span class="nav-number">1.5.</span> <span class="nav-text">eqeqeq</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#es3"><span class="nav-number">1.6.</span> <span class="nav-text">es3</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#es5"><span class="nav-number">1.7.</span> <span class="nav-text">es5</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#esversion"><span class="nav-number">1.8.</span> <span class="nav-text">esversion</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#forin"><span class="nav-number">1.9.</span> <span class="nav-text">forin</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#freeze"><span class="nav-number">1.10.</span> <span class="nav-text">freeze</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#funcscope"><span class="nav-number">1.11.</span> <span class="nav-text">funcscope</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#futurehostile"><span class="nav-number">1.12.</span> <span class="nav-text">futurehostile</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#globals"><span class="nav-number">1.13.</span> <span class="nav-text">globals</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#immed"><span class="nav-number">1.14.</span> <span class="nav-text">immed</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#indent"><span class="nav-number">1.15.</span> <span class="nav-text">indent</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#iterator"><span class="nav-number">1.16.</span> <span class="nav-text">iterator</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#latedef"><span class="nav-number">1.17.</span> <span class="nav-text">latedef</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#maxcomplexity"><span class="nav-number">1.18.</span> <span class="nav-text">maxcomplexity</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#maxdepth"><span class="nav-number">1.19.</span> <span class="nav-text">maxdepth</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#maxerr"><span class="nav-number">1.20.</span> <span class="nav-text">maxerr</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#maxlen"><span class="nav-number">1.21.</span> <span class="nav-text">maxlen</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#maxparams"><span class="nav-number">1.22.</span> <span class="nav-text">maxparams</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#maxstatements"><span class="nav-number">1.23.</span> <span class="nav-text">maxstatements</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#newcap"><span class="nav-number">1.24.</span> <span class="nav-text">newcap</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#noarg"><span class="nav-number">1.25.</span> <span class="nav-text">noarg</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#nocomma"><span class="nav-number">1.26.</span> <span class="nav-text">nocomma</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#noempty"><span class="nav-number">1.27.</span> <span class="nav-text">noempty</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#nonbsp"><span class="nav-number">1.28.</span> <span class="nav-text">nonbsp</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#nonew"><span class="nav-number">1.29.</span> <span class="nav-text">nonew</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#notypeof"><span class="nav-number">1.30.</span> <span class="nav-text">notypeof</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#predef"><span class="nav-number">1.31.</span> <span class="nav-text">predef</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#quotmark"><span class="nav-number">1.32.</span> <span class="nav-text">quotmark</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#shadow"><span class="nav-number">1.33.</span> <span class="nav-text">shadow</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#singleGroups"><span class="nav-number">1.34.</span> <span class="nav-text">singleGroups</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#strict"><span class="nav-number">1.35.</span> <span class="nav-text">strict</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#undef"><span class="nav-number">1.36.</span> <span class="nav-text">undef</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#unused"><span class="nav-number">1.37.</span> <span class="nav-text">unused</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#varstmt"><span class="nav-number">1.38.</span> <span class="nav-text">varstmt</span></a></li>
                    </ol>
                  </li>
                  <li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%94%BE%E6%9D%BE%E7%9A%84%E9%80%89%E6%8B%A9"><span class="nav-number">2.</span> <span class="nav-text">放松的选择</span></a>
                    <ol class="nav-child">
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#asi"><span class="nav-number">2.1.</span> <span class="nav-text">asi</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#boss"><span class="nav-number">2.2.</span> <span class="nav-text">boss</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#debug"><span class="nav-number">2.3.</span> <span class="nav-text">debug</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#eqnull"><span class="nav-number">2.4.</span> <span class="nav-text">eqnull</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#esnext"><span class="nav-number">2.5.</span> <span class="nav-text">esnext</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#evil"><span class="nav-number">2.6.</span> <span class="nav-text">evil</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#expr"><span class="nav-number">2.7.</span> <span class="nav-text">expr</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#globalstrict"><span class="nav-number">2.8.</span> <span class="nav-text">globalstrict</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#lastsemic"><span class="nav-number">2.9.</span> <span class="nav-text">lastsemic</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#laxbreak"><span class="nav-number">2.10.</span> <span class="nav-text">laxbreak</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#laxcomma"><span class="nav-number">2.11.</span> <span class="nav-text">laxcomma</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#loopfunc"><span class="nav-number">2.12.</span> <span class="nav-text">loopfunc</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#moz"><span class="nav-number">2.13.</span> <span class="nav-text">moz</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#multistr"><span class="nav-number">2.14.</span> <span class="nav-text">multistr</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#noyield"><span class="nav-number">2.15.</span> <span class="nav-text">noyield</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#plusplus"><span class="nav-number">2.16.</span> <span class="nav-text">plusplus</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#proto"><span class="nav-number">2.17.</span> <span class="nav-text">proto</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#scripturl"><span class="nav-number">2.18.</span> <span class="nav-text">scripturl</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#sub"><span class="nav-number">2.19.</span> <span class="nav-text">sub</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#supernew"><span class="nav-number">2.20.</span> <span class="nav-text">supernew</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#validthis"><span class="nav-number">2.21.</span> <span class="nav-text">validthis</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#withstmt"><span class="nav-number">2.22.</span> <span class="nav-text">withstmt</span></a></li>
                    </ol>
                  </li>
                  <li class="nav-item nav-level-1"><a class="nav-link" href="#%E7%8E%AF%E5%A2%83"><span class="nav-number">3.</span> <span class="nav-text">环境</span></a>
                    <ol class="nav-child">
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#browser"><span class="nav-number">3.1.</span> <span class="nav-text">browser</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#browserify"><span class="nav-number">3.2.</span> <span class="nav-text">browserify</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#couch"><span class="nav-number">3.3.</span> <span class="nav-text">couch</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#devel"><span class="nav-number">3.4.</span> <span class="nav-text">devel</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#dojo"><span class="nav-number">3.5.</span> <span class="nav-text">dojo</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#jasmine"><span class="nav-number">3.6.</span> <span class="nav-text">jasmine</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#j-query-%EF%BC%88%E5%87%BA%E7%8E%B0%E6%9C%AA%E7%9F%A5%E6%83%85%E5%86%B5%EF%BC%8C%E5%8A%A0%E7%A9%BA%E6%A0%BC%E8%A7%A3%E5%86%B3%EF%BC%89"><span class="nav-number">3.7.</span> <span class="nav-text">j query （出现未知情况，加空格解决）</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#mocha"><span class="nav-number">3.8.</span> <span class="nav-text">mocha</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#module"><span class="nav-number">3.9.</span> <span class="nav-text">module</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#mootools"><span class="nav-number">3.10.</span> <span class="nav-text">mootools</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#node"><span class="nav-number">3.11.</span> <span class="nav-text">node</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#nonstandard"><span class="nav-number">3.12.</span> <span class="nav-text">nonstandard</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#phantom"><span class="nav-number">3.13.</span> <span class="nav-text">phantom</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#prototypejs"><span class="nav-number">3.14.</span> <span class="nav-text">prototypejs</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#qunit"><span class="nav-number">3.15.</span> <span class="nav-text">qunit</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#rhino"><span class="nav-number">3.16.</span> <span class="nav-text">rhino</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#shelljs"><span class="nav-number">3.17.</span> <span class="nav-text">shelljs</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#typed"><span class="nav-number">3.18.</span> <span class="nav-text">typed</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#worker"><span class="nav-number">3.19.</span> <span class="nav-text">worker</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#wsh"><span class="nav-number">3.20.</span> <span class="nav-text">wsh</span></a></li>
                      <li class="nav-item nav-level-2"><a class="nav-link" href="#yui"><span class="nav-number">3.21.</span> <span class="nav-text">yui</span></a></li>
                    </ol>
                  </li>
                </ol>
              </div>
            </div>
            <!--/noindex-->

            <div class="site-overview-wrap sidebar-panel">
              <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
                <p class="site-author-name" itemprop="name">holidaypenguin</p>
                <div class="site-description" itemprop="description"></div>
              </div>
              <div class="site-state-wrap site-overview-item animated">
                <nav class="site-state">
                  <div class="site-state-item site-state-posts">
                    <a href="/archives/">

                      <span class="site-state-item-count">138</span>
                      <span class="site-state-item-name">日志</span>
                    </a>
                  </div>
                  <div class="site-state-item site-state-categories">
                    <a href="/categories/">

                      <span class="site-state-item-count">26</span>
                      <span class="site-state-item-name">分类</span></a>
                  </div>
                  <div class="site-state-item site-state-tags">
                    <a href="/tags/">

                      <span class="site-state-item-count">234</span>
                      <span class="site-state-item-name">标签</span></a>
                  </div>
                </nav>
              </div>
              <div class="links-of-author site-overview-item animated">
                <span class="links-of-author-item">
                  <a href="https://github.com/holidaypenguin" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;holidaypenguin" rel="noopener" target="_blank"><i class="github fa-fw"></i>GitHub</a>
                </span>
                <span class="links-of-author-item">
                  <a href="mailto:songshipeng2016@gmail.com" title="E-Mail → mailto:songshipeng2016@gmail.com" rel="noopener" target="_blank"><i class="envelope fa-fw"></i>E-Mail</a>
                </span>
              </div>



            </div>
          </div>
        </div>
      </aside>
      <div class="sidebar-dimmer"></div>


    </header>


    <div class="back-to-top" role="button">
      <i class="fa fa-arrow-up"></i>
      <span>0%</span>
    </div>

    <noscript>
      <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
    </noscript>


    <div class="main-inner post posts-expand">





      <div class="post-block">



        <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
          <link itemprop="mainEntityOfPage" href="https://holidaypenguin.gitee.io/blob/2017-03-13-ide-sublime-lint-jshint-configuration-options/">

          <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
            <meta itemprop="image" content="/images/avatar.gif">
            <meta itemprop="name" content="holidaypenguin">
            <meta itemprop="description" content="">
          </span>

          <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
            <meta itemprop="name" content="HolidayPenguin">
          </span>
          <header class="post-header">
            <h1 class="post-title" itemprop="name headline">
              IDE-Sublime lint-JSHint 配置选项
            </h1>

            <div class="post-meta-container">
              <div class="post-meta">
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-calendar"></i>
                  </span>
                  <span class="post-meta-item-text">发表于</span>

                  <time title="创建时间：2017-03-13 18:05:58" itemprop="dateCreated datePublished" datetime="2017-03-13T18:05:58+08:00">2017-03-13</time>
                </span>
                <span class="post-meta-item">
                  <span class="post-meta-item-icon">
                    <i class="far fa-folder"></i>
                  </span>
                  <span class="post-meta-item-text">分类于</span>
                  <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                    <a href="/categories/IDE/" itemprop="url" rel="index"><span itemprop="name">IDE</span></a>
                  </span>
                </span>


                <span id="/blob/2017-03-13-ide-sublime-lint-jshint-configuration-options/" class="post-meta-item leancloud_visitors" data-flag-title="IDE-Sublime lint-JSHint 配置选项" title="阅读次数">
                  <span class="post-meta-item-icon">
                    <i class="far fa-eye"></i>
                  </span>
                  <span class="post-meta-item-text">阅读次数：</span>
                  <span class="leancloud-visitors-count"></span>
                </span>
              </div>

              <div class="post-description">
                <!-- more -->
              </div>
            </div>
          </header>




          <div class="post-body" itemprop="articleBody">
            <p>JSHint选项<br>此页面的内容源自<a target="_blank" rel="noopener" href="https://github.com/jshint/jshint">JSHint</a>项目存储库。如果您发现错误，请<a target="_blank" rel="noopener" href="https://github.com/jshint/jshint/issues/new">打开一个问题</a>或（更好的）<a target="_blank" rel="noopener" href="https://github.com/jshint/jshint/compare">提出拉请求</a>！</p>
            <p>来自官方文档 <a target="_blank" rel="noopener" href="http://jshint.com/docs/options/#enforceall">http://jshint.com/docs/options/#enforceall</a> google翻译</p>
            <h1 id="强制执行选项"><a href="#强制执行选项" class="headerlink" title="强制执行选项"></a>强制执行选项</h1>
            <p>当设置为true时，这些选项将使JSHint产生更多关于您的代码的警告。</p>
            <h2 id="bitwise"><a href="#bitwise" class="headerlink" title="bitwise"></a>bitwise</h2>
            <p>此选项禁止使用按位运算符，例如^（XOR）， |（OR）和其他。位运算符在JavaScript程序中非常罕见，而且往往&amp;只是一个错误类型&amp;&amp;。</p>
            <h2 id="camelcase"><a href="#camelcase" class="headerlink" title="camelcase"></a>camelcase</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项允许强制所有变量名称使用camelCase样式或带下划线的UPPER_CASE。</p>
            <h2 id="curly"><a href="#curly" class="headerlink" title="curly"></a>curly</h2>
            <p>此选项要求您始终在循环和条件中的块周围放置花括号。当块仅包含一个语句时，JavaScript允许您省略花括号，例如：while (day) shuffle();然而，在某些情况下，它可能导致错误（你会认为这 sleep()是循环的一部分，而实际上它不是）：while (day) shuffle(); sleep();</p>
            <h2 id="enforceall"><a href="#enforceall" class="headerlink" title="enforceall"></a>enforceall</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 如果不自动选择让用户使用新功能，则无法维护该选项。这可能会导致在次要版本的JSHint之间升级时出现意外的警告/错误。此选项是JSHint版本2.6.3中提供的最严格的JSHint配置的简写。它启用所有强制执行选项并禁用在该版本中定义的所有轻松选项。</p>
            <h2 id="eqeqeq"><a href="#eqeqeq" class="headerlink" title="eqeqeq"></a>eqeqeq</h2>
            <p>此选项禁止使用==和!=支持===和 !==。前者在比较之前尝试强制值，这可能导致一些意想不到的结果。后者不做任何强制，所以他们一般更安全。如果你想更多地了解JavaScript中的类型强制，我们推荐 Angus Croll的真理，平等和JavaScript。</p>
            <h2 id="es3"><a href="#es3" class="headerlink" title="es3"></a>es3</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 请esversion: 3改用。这个选项告诉JSHint你的代码需要遵守ECMAScript 3规范。如果您需要您的程序在旧版浏览器（如Internet Explorer 6/7/8/9）和其他旧版JavaScript环境中可执行，请使用此选项。</p>
            <h2 id="es5"><a href="#es5" class="headerlink" title="es5"></a>es5</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 请esversion: 5改用。此选项启用首先在ECMAScript 5.1规范中定义的语法。这包括允许保留关键字作为对象属性。</p>
            <h2 id="esversion"><a href="#esversion" class="headerlink" title="esversion"></a>esversion</h2>
            <p>此选项用于指定代码必须遵守的ECMAScript版本。它可以采用以下值之一：3 - 如果您需要您的程序在旧版浏览器（如Internet Explorer 6/7/8/9）和其他旧版JavaScript环境中可执行5- 启用首先在ECMAScript 5.1规范中定义的语法。这包括允许保留关键字作为对象属性。6- 告诉JSHint你的代码使用ECMAScript 6的特定语法。请注意，并非所有浏览器都实现它们。</p>
            <h2 id="forin"><a href="#forin" class="headerlink" title="forin"></a>forin</h2>
            <p>此选项需要所有for in循环过滤对象的项目。for语句允许循环遍历对象的所有属性的名称，包括通过原型链继承的那些属性的名称。此行为可能导致对象中的意外项目，因此通常更安全地筛选继承属性，如示例所示：for (key in obj) { if (obj.hasOwnProperty(key)) { // We are sure that obj[key] belongs to the object and was not inherited. }}要更深入地了解JavaScript中的for in循环，请 参阅 Angus Croll 探索JavaScript for-in循环。</p>
            <h2 id="freeze"><a href="#freeze" class="headerlink" title="freeze"></a>freeze</h2>
            <p>这个选项禁止重写本地对象如原型 Array，Date等等。// jshint freeze:trueArray.prototype.count = function (value) { return 4; };// -&gt; Warning: Extending prototype of native object: ‘Array’.</p>
            <h2 id="funcscope"><a href="#funcscope" class="headerlink" title="funcscope"></a>funcscope</h2>
            <p>此选项抑制关于在控制结构内声明变量的警告，同时从外部访问它们。即使JavaScript只有两个真实范围 - 全局和函数 - 这样的实践导致新的语言和难以调试的bug的人之间的混乱。这就是为什么，默认情况下，JSHint警告在预期范围之外使用的变量。function test() { if (true) { var x = 0; } x += 1; // Default: ‘x’ used out of scope. // No warning when funcscope:true}</p>
            <h2 id="futurehostile"><a href="#futurehostile" class="headerlink" title="futurehostile"></a>futurehostile</h2>
            <p>此选项启用有关使用在未来版本的JavaScript中定义的标识符的警告。虽然覆盖它们在没有实现的上下文中没有效果，但是当将代码库迁移到该语言的较新版本时，这种做法会引起问题。</p>
            <h2 id="globals"><a href="#globals" class="headerlink" title="globals"></a>globals</h2>
            <p>此选项可用于指定未在源代码中正式定义的全局变量的白名单。当与undef选项组合时，这是最有用的，以便抑制特定于项目的全局变量的警告。设置条目以true启用读取和写入该变量。将其设置为false将触发JSHint将该变量视为只读。另请参见“环境”选项：一组选项，用于启用在常见JavaScript环境中定义的全局变量。要globals在单个文件中配置，请参阅内联配置。</p>
            <h2 id="immed"><a href="#immed" class="headerlink" title="immed"></a>immed</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项禁止使用立即函数调用，而不将其包含在括号中。括号括号帮助您的代码的读者理解表达式是函数的结果，而不是函数本身。</p>
            <h2 id="indent"><a href="#indent" class="headerlink" title="indent"></a>indent</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项为代码设置特定的制表符宽度。</p>
            <h2 id="iterator"><a href="#iterator" class="headerlink" title="iterator"></a>iterator</h2>
            <p>此选项禁止有关__iterator__属性的警告。此属性不受所有浏览器支持，因此请仔细使用它。</p>
            <h2 id="latedef"><a href="#latedef" class="headerlink" title="latedef"></a>latedef</h2>
            <p>此选项禁止在定义变量之前使用变量。JavaScript只有函数范围，除此之外，所有的变量总是被移动或悬挂到函数的顶部。这种行为可以导致一些非常讨厌的错误，这就是为什么它是更安全的总是使用变量只有在它们被明确定义之后。将此选项设置为“nofunc”将允许忽略函数声明。为了更深入地了解JavaScript中的范围和提升，请阅读 Ben Cherry的JavaScript Scoping和Hoisting。</p>
            <h2 id="maxcomplexity"><a href="#maxcomplexity" class="headerlink" title="maxcomplexity"></a>maxcomplexity</h2>
            <p>此选项允许您控制整个代码中的循环复杂性。环路复杂性测量通过程序源代码的线性独立路径的数量。阅读更多关于维基百科上的复杂性。</p>
            <h2 id="maxdepth"><a href="#maxdepth" class="headerlink" title="maxdepth"></a>maxdepth</h2>
            <p>此选项允许您控制嵌套的嵌套方式：// jshint maxdepth:2function main(meaning) { var day = true; if (meaning === 42) { while (day) { shuffle(); if (tired) { // JSHint: Blocks are nested too deeply (3). sleep(); } } }}</p>
            <h2 id="maxerr"><a href="#maxerr" class="headerlink" title="maxerr"></a>maxerr</h2>
            <p>此选项允许您设置JSHint将在放弃之前产生的最大警告量。默认值为50。</p>
            <h2 id="maxlen"><a href="#maxlen" class="headerlink" title="maxlen"></a>maxlen</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项允许您设置线的最大长度。</p>
            <h2 id="maxparams"><a href="#maxparams" class="headerlink" title="maxparams"></a>maxparams</h2>
            <p>此选项允许您设置每个函数允许的形式参数的最大数量：// jshint maxparams:3function login(request, onSuccess) { // …}// JSHint: Too many parameters per function (4).function logout(request, isManual, whereAmI, onSuccess) { // …}</p>
            <h2 id="maxstatements"><a href="#maxstatements" class="headerlink" title="maxstatements"></a>maxstatements</h2>
            <p>此选项允许您设置每个函数允许的最大语句数：// jshint maxstatements:4function main() { var i = 0; var j = 0; // Function declarations count as one statement. Their bodies // don’t get taken into account for the outer function. function inner() { var i2 = 1; var j2 = 1; return i2 + j2; } j = i + j; return j; // JSHint: Too many statements per function. (5)}</p>
            <h2 id="newcap"><a href="#newcap" class="headerlink" title="newcap"></a>newcap</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项需要大写构造函数的名称。与new操作符一起使用的大写函数只是一个约定，帮助程序员在视觉上区分构造函数和其他类型的函数，以帮助在使用时发现错误this。不这样做不会在任何浏览器或环境中破坏你的代码，但是通过阅读代码 - 如果函数应该使用或不使用新的，将更难一些。这很重要，因为当要使用的函数 new没有使用它时，this将指向全局对象而不是新对象。</p>
            <h2 id="noarg"><a href="#noarg" class="headerlink" title="noarg"></a>noarg</h2>
            <p>此选项禁止使用arguments.caller和 arguments.callee。两者.caller并且.callee做了不少优化是不可能的，所以他们在JavaScript的未来版本中被弃用。事实上，ECMAScript 5禁止arguments.callee 在严格模式下使用。</p>
            <h2 id="nocomma"><a href="#nocomma" class="headerlink" title="nocomma"></a>nocomma</h2>
            <p>此选项禁止使用逗号运算符。当误用时，逗号运算符可能会掩盖语句的值，并促进错误的代码。</p>
            <h2 id="noempty"><a href="#noempty" class="headerlink" title="noempty"></a>noempty</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项在代码中具有空块时发出警告。JSLint最初是对所有空块的警告，我们只是使其可选。没有研究报告，JavaScript中的空块以任何方式破坏您的代码。</p>
            <h2 id="nonbsp"><a href="#nonbsp" class="headerlink" title="nonbsp"></a>nonbsp</h2>
            <p>此选项警告“不间断的空格”字符。这些字符可以在Mac计算机上与选项空间一起输入，并有可能中断非UTF8网页。</p>
            <h2 id="nonew"><a href="#nonew" class="headerlink" title="nonew"></a>nonew</h2>
            <p>此选项禁止使用用于副作用的构造函数。有些人喜欢调用构造函数而不将其结果赋给任何变量：new MyConstructor();这种方法没有优势， MyConstructor因为操作符new创建的对象不在任何地方使用，所以你通常应该避免像这样的构造函数。</p>
            <h2 id="notypeof"><a href="#notypeof" class="headerlink" title="notypeof"></a>notypeof</h2>
            <p>此选项禁止有关无效typeof运算符值的警告。此运算符只有一组有限的可能返回值。默认情况下，JSHint警告，当您将其结果与一个无效值，通常可以是错字。// ‘fuction’ instead of ‘function’if (typeof a == “fuction”) { // Invalid typeof value ‘fuction’ // …}不要使用此选项，除非你绝对确定不需要这些检查。</p>
            <h2 id="predef"><a href="#predef" class="headerlink" title="predef"></a>predef</h2>
            <p>此选项允许您控制JSHint认为要在环境中隐式定义的变量。使用字符串值数组配置它。使用连字符（ - ）字符前缀变量名将从预定义变量的集合中删除该名称。JSHint将考虑以这种方式声明的变量是只读的。此选项不能在线指定; 它只能通过JavaScript API或外部配置文件使用。</p>
            <h2 id="quotmark"><a href="#quotmark" class="headerlink" title="quotmark"></a>quotmark</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项强制在您的代码中使用的引号的一致性。它接受三个值：true如果你不想强制一个特定的风格，但想要一些一致性，”single”如果你只想允许单引号，并且”double”如果你只想允许双引号。</p>
            <h2 id="shadow"><a href="#shadow" class="headerlink" title="shadow"></a>shadow</h2>
            <p>此选项禁止关于变量阴影的警告，即声明已在外部作用域中某处声明的变量。“inner” - 检查在同一范围内定义的变量“outer” - 检查外部作用域中定义的变量false - 与inner相同true - 允许可变阴影</p>
            <h2 id="singleGroups"><a href="#singleGroups" class="headerlink" title="singleGroups"></a>singleGroups</h2>
            <p>当不严格要求时，此选项禁止使用分组运算符。这种使用通常反映对一元操作符的误解，例如：// jshint singleGroups: truedelete(obj.attr); // Warning: Unnecessary grouping operator.</p>
            <h2 id="strict"><a href="#strict" class="headerlink" title="strict"></a>strict</h2>
            <p>此选项要求代码在ECMAScript 5的strict模式下运行。 严格模式 是选择限制JavaScript版本的一种方式。严格模式消除了一些JavaScript错误，没有通过更改它们产生错误不会导致错误。它还修正了错误，使JavaScript引擎难以执行某些优化。“全球” - “use strict”;在全球层面必须有一个指令“隐含” - 将代码看作有”use strict”;指令false - 禁用关于严格模式的警告true - “use strict”;在函数级别必须有一个指令; this is preferable for scripts intended to be loaded in web browsers directly because enabling strict mode globally could adversely effect other scripts running on the same page</p>
            <h2 id="undef"><a href="#undef" class="headerlink" title="undef"></a>undef</h2>
            <p>此选项禁止使用明确未声明的变量。此选项对于发现泄漏和错误的变量非常有用。// jshint undef:truefunction test() { var myVar = ‘Hello, World’; console.log(myvar); // Oops, typoed here. JSHint with undef will complain}如果你的变量在另一个文件中定义，你可以使用global 指令告诉JSHint它。</p>
            <h2 id="unused"><a href="#unused" class="headerlink" title="unused"></a>unused</h2>
            <p>此选项在定义和不使用变量时发出警告。这对于一般的代码清理非常有用，特别是在除了使用之外 undef。// jshint unused:truefunction test(a, b) { var c, d = 2; return a + d;}test(1, 2);// Line 3: ‘b’ was defined but never used.// Line 4: ‘c’ was defined but never used.除此之外，此选项将警告您通过该global伪指令声明的未使用的全局变量。这可以设置为vars仅检查变量，而不是函数参数，或strict检查所有变量和参数。默认（true）行为是允许未使用的参数，后跟一个使用的参数。</p>
            <h2 id="varstmt"><a href="#varstmt" class="headerlink" title="varstmt"></a>varstmt</h2>
            <p>当设置为true时，禁止使用VariableStatements。例如：// jshint varstmt: truevar a; // Warning: <code>var</code> declarations are forbidden. Use <code>let</code> or <code>const</code> instead.</p>
            <h1 id="放松的选择"><a href="#放松的选择" class="headerlink" title="放松的选择"></a>放松的选择</h1>
            <p>当设置为true时，这些选项将使JSHint对您的代码产生较少的警告。</p>
            <h2 id="asi"><a href="#asi" class="headerlink" title="asi"></a>asi</h2>
            <p>此选项禁止有关缺少的分号的警告。有很多关于分号的FUD被社区中的很多人传播。常见的神话是，分号是一直需要的（他们不是），并且他们是不可靠的。JavaScript有关于分号的规则，所有浏览器都遵循这些规则，所以由您自己决定是否应该在代码中使用分号。有关JavaScript中的分号的更多信息，请参阅 Isaac Schlueter的分号和JavaScript分号插入对JavaScript领导人的公开信。</p>
            <h2 id="boss"><a href="#boss" class="headerlink" title="boss"></a>boss</h2>
            <p>此选项在预期进行比较的情况下禁止关于分配的使用的警告。通常情况下，代码if (a = 10) {}就是一个拼写错误。但是，它可以在这样的情况下有用：for (var i = 0, person; person = people[i]; i++) {}您可以通过使用括号包围该分配来按用途隐藏此错误，例如：for (var i = 0, person; (person = people[i]); i++) {}</p>
            <h2 id="debug"><a href="#debug" class="headerlink" title="debug"></a>debug</h2>
            <p>此选项禁止对debugger代码中的语句的警告。<br>elision 此选项告诉JSHint您的代码使用ES3数组elision元素，或空元素（例如，[1, , , 4, , , 7]）。</p>
            <h2 id="eqnull"><a href="#eqnull" class="headerlink" title="eqnull"></a>eqnull</h2>
            <p>此选项禁止有关== null比较的警告。当你想检查一个变量是null或是时，这种比较通常是有用的 undefined。</p>
            <h2 id="esnext"><a href="#esnext" class="headerlink" title="esnext"></a>esnext</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 请esversion: 6改用。此选项告诉JSHint您的代码使用ECMAScript 6特定的语法。请注意，并非所有浏览器都实现这些功能。更多信息：ECMAScript 6规范</p>
            <h2 id="evil"><a href="#evil" class="headerlink" title="evil"></a>evil</h2>
            <p>此选项禁止有关使用的警告eval。使用是 eval不鼓励的，因为它可以使您的代码易受各种注入攻击，这使得JavaScript解释器很难做某些优化。</p>
            <h2 id="expr"><a href="#expr" class="headerlink" title="expr"></a>expr</h2>
            <p>此选项禁止有关使用通常希望看到赋值或函数调用的表达式的警告。大多数时候，这样的代码是拼写错误。但是，它不被规范禁止，这就是为什么这个警告是可选的。</p>
            <h2 id="globalstrict"><a href="#globalstrict" class="headerlink" title="globalstrict"></a>globalstrict</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 使用strict: “global”。此选项禁止关于使用全局严格模式的警告。全局严格模式可以打破第三方小部件，因此不推荐使用。有关严格模式的详细信息，请参阅strict选项。</p>
            <h2 id="lastsemic"><a href="#lastsemic" class="headerlink" title="lastsemic"></a>lastsemic</h2>
            <p>此选项禁止有关缺少的分号的警告，但仅在单行块中的最后一条语句省略分号时：var name = (function() { return ‘Anton’ }());这是一个非常小众的用例，只有当您使用自动JavaScript代码生成器时才有用。</p>
            <h2 id="laxbreak"><a href="#laxbreak" class="headerlink" title="laxbreak"></a>laxbreak</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项抑制大多数有关代码中可能不安全的换行符的警告。它不抑制关于逗号优先编码风格的警告。要抑制那些你必须使用laxcomma（见下文）。</p>
            <h2 id="laxcomma"><a href="#laxcomma" class="headerlink" title="laxcomma"></a>laxcomma</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项禁止关于逗号优先编码样式的警告：var obj = { name: ‘Anton’ , handle: ‘valueof’ , role: ‘SW Engineer’};</p>
            <h2 id="loopfunc"><a href="#loopfunc" class="headerlink" title="loopfunc"></a>loopfunc</h2>
            <p>此选项禁止对循环中的函数的警告。定义循环中的函数可能会导致如下的错误：var nums = [];for (var i = 0; i &lt; 10; i++) { nums[i] = function (j) { return i + j; };}nums<a href="2">0</a>; // Prints 12 instead of 2要修复上面的代码，你需要复制的值i：var nums = [];for (var i = 0; i &lt; 10; i++) { (function (i) { nums[i] = function (j) { return i + j; }; }(i));}</p>
            <h2 id="moz"><a href="#moz" class="headerlink" title="moz"></a>moz</h2>
            <p>这个选项告诉JSHint你的代码使用Mozilla JavaScript扩展。除非您专门为Firefox Web浏览器开发，否则不需要此选项。更多信息：新的JavaScript 1.7</p>
            <h2 id="multistr"><a href="#multistr" class="headerlink" title="multistr"></a>multistr</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项抑制有关多行字符串的警告。多行字符串在JavaScript中是很危险的，因为如果你不小心在转义字符（\）和一个新行之间放了一个空格，所有的地狱都会松动。请注意，即使此选项允许正确的多行字符串，它仍然警告多行字符串没有转义字符或转义字符和空格之间的任何东西。// jshint multistr:truevar text = “Hello\World”; // All good.text = “HelloWorld”; // Warning, no escape character.text = “Hello\World”; // Warning, there is a space after \</p>
            <h2 id="noyield"><a href="#noyield" class="headerlink" title="noyield"></a>noyield</h2>
            <p>此选项抑制关于生成函数的警告，其中没有 yield语句。</p>
            <h2 id="plusplus"><a href="#plusplus" class="headerlink" title="plusplus"></a>plusplus</h2>
            <p>此选项禁止使用一元增量和减量运算符。有些人认为，++并–降低了他们的编码风格的质量，有编程语言，如Python，完全没有这些运算符。</p>
            <h2 id="proto"><a href="#proto" class="headerlink" title="proto"></a>proto</h2>
            <p>此选项禁止有关__proto__属性的警告。</p>
            <h2 id="scripturl"><a href="#scripturl" class="headerlink" title="scripturl"></a>scripturl</h2>
            <p>此选项会禁止关于使用以脚本为目标的网址的警告，例如javascript:…。</p>
            <h2 id="sub"><a href="#sub" class="headerlink" title="sub"></a>sub</h2>
            <p>警告此选项已被弃用，将在JSHint的下一个主要版本中删除。 JSHint将其范围限制为代码正确性的问题。如果你想强制执行有关代码风格的规则，请查看JSCS项目。此选项将禁止使用有关的警告[]符号时，它可以在点符号来表示：person[‘name’]对person.name。</p>
            <h2 id="supernew"><a href="#supernew" class="headerlink" title="supernew"></a>supernew</h2>
            <p>此选项抑制关于“怪异”结构的警告，如 new function () { … }和new Object;。这种结构有时用于在JavaScript中产生单例：var singleton = new function() { var privateVar; this.publicMethod = function () {} this.publicMethod2 = function () {}};</p>
            <h2 id="validthis"><a href="#validthis" class="headerlink" title="validthis"></a>validthis</h2>
            <p>当代码以严格模式运行并this在非构造函数中使用时，此选项将禁止有关可能的严重违规的警告。你应该使用这个选项 - 在一个函数范围内 - 当你肯定你的使用this在严格模式是有效的（例如，如果你调用你的函数使用 Function.call）。注意：此选项只能在函数作用域内使用。如果您尝试全局设置此选项，JSHint将失败并显示错误。</p>
            <h2 id="withstmt"><a href="#withstmt" class="headerlink" title="withstmt"></a>withstmt</h2>
            <p>此选项禁止有关使用语句的警告with。语句的with语义可能导致开发人员之间的混乱和全局变量的意外定义。更多信息：与声明考虑有害</p>
            <h1 id="环境"><a href="#环境" class="headerlink" title="环境"></a>环境</h1>
            <p>这些选项让JSHint知道一些预定义的全局变量。</p>
            <h2 id="browser"><a href="#browser" class="headerlink" title="browser"></a>browser</h2>
            <p>此选项定义了现代浏览器暴露全局：从好老一路document和navigator对HTML5 FileReader在浏览器世界等新的发展。注意：此选项不会公开像alert或的 变量console。有关详细信息，请参阅选项devel。</p>
            <h2 id="browserify"><a href="#browserify" class="headerlink" title="browserify"></a>browserify</h2>
            <p>此选项定义使用Browserify工具构建项目时可用的全局变量。</p>
            <h2 id="couch"><a href="#couch" class="headerlink" title="couch"></a>couch</h2>
            <p>此选项定义由CouchDB公开的全局变量 。CouchDB是一个面向文档的数据库，可以使用JavaScript以MapReduce方式查询和索引。</p>
            <h2 id="devel"><a href="#devel" class="headerlink" title="devel"></a>devel</h2>
            <p>此选项定义通常用于记录恶意调试的全局变量：console，alert等等。通常不建议在生产环境中运行它们，因为例如console.log在Internet Explorer的旧版本中断。</p>
            <h2 id="dojo"><a href="#dojo" class="headerlink" title="dojo"></a>dojo</h2>
            <p>此选项定义由Dojo Toolkit公开的全局变量。</p>
            <h2 id="jasmine"><a href="#jasmine" class="headerlink" title="jasmine"></a>jasmine</h2>
            <p>此选项定义由Jasmine单元测试框架公开的全局变量。</p>
            <h2 id="j-query-（出现未知情况，加空格解决）"><a href="#j-query-（出现未知情况，加空格解决）" class="headerlink" title="j query （出现未知情况，加空格解决）"></a>j query （出现未知情况，加空格解决）</h2>
            <p>此选项定义由jQuery JavaScript库公开的全局变量。</p>
            <h2 id="mocha"><a href="#mocha" class="headerlink" title="mocha"></a>mocha</h2>
            <p>此选项定义由摩卡单元测试框架的“BDD”和“TDD”UI公开的全局变量 。</p>
            <h2 id="module"><a href="#module" class="headerlink" title="module"></a>module</h2>
            <p>此选项通知JSHint输入代码描述了ECMAScript 6模块。所有模块代码都被解释为严格模式代码。</p>
            <h2 id="mootools"><a href="#mootools" class="headerlink" title="mootools"></a>mootools</h2>
            <p>此选项定义由MooTools JavaScript框架公开的全局变量 。</p>
            <h2 id="node"><a href="#node" class="headerlink" title="node"></a>node</h2>
            <p>此选项定义当代码在Node运行时环境中运行时可用的全局变量。Node.js是一个使用异步事件驱动模型的服务器端JavaScript环境。此选项还会跳过在浏览器环境中有意义的一些警告，但在节点（如文件级use strict编译指示和console.log语句）中没有意义。</p>
            <h2 id="nonstandard"><a href="#nonstandard" class="headerlink" title="nonstandard"></a>nonstandard</h2>
            <p>此选项定义非标准但广泛采用的全局变量，如 escape和unescape。</p>
            <h2 id="phantom"><a href="#phantom" class="headerlink" title="phantom"></a>phantom</h2>
            <p>此选项定义当您的核心在PhantomJS运行时环境中运行时可用的全局变量。PhantomJS 是一个使用JavaScript API的无头WebKit脚本。它支持各种Web标准的快速和本地支持：DOM处理，CSS选择器，JSON，Canvas和SVG。</p>
            <h2 id="prototypejs"><a href="#prototypejs" class="headerlink" title="prototypejs"></a>prototypejs</h2>
            <p>此选项定义由Prototype JavaScript框架公开的全局变量 。</p>
            <h2 id="qunit"><a href="#qunit" class="headerlink" title="qunit"></a>qunit</h2>
            <p>此选项定义由QUnit单元测试框架公开的全局变量。</p>
            <h2 id="rhino"><a href="#rhino" class="headerlink" title="rhino"></a>rhino</h2>
            <p>此选项定义当代码在Rhino运行时环境中运行时可用的全局变量。Rhino 是一个完全用Java编写的JavaScript的开源实现。</p>
            <h2 id="shelljs"><a href="#shelljs" class="headerlink" title="shelljs"></a>shelljs</h2>
            <p>此选项定义由ShellJS库公开的全局变量。</p>
            <h2 id="typed"><a href="#typed" class="headerlink" title="typed"></a>typed</h2>
            <p>此选项为类型化数组构造函数定义全局变量。更多信息：JavaScript类型数组</p>
            <h2 id="worker"><a href="#worker" class="headerlink" title="worker"></a>worker</h2>
            <p>此选项定义当代码在Web Worker中运行时可用的全局变量。Web Workers为Web内容在后台线程中运行脚本提供了一种简单的方法。</p>
            <h2 id="wsh"><a href="#wsh" class="headerlink" title="wsh"></a>wsh</h2>
            <p>此选项定义当代码作为Windows脚本宿主的脚本运行时可用的全局变量。</p>
            <h2 id="yui"><a href="#yui" class="headerlink" title="yui"></a>yui</h2>
            <p>此选项定义由YUI JavaScript框架公开的全局变量。</p>

          </div>





          <footer class="post-footer">
            <div class="post-tags">
              <a href="/tags/IDE/" rel="tag"># IDE</a>
              <a href="/tags/Sublime/" rel="tag"># Sublime</a>
              <a href="/tags/%E5%B7%A5%E5%85%B7/" rel="tag"># 工具</a>
            </div>



            <div class="post-nav">
              <div class="post-nav-item">
                <a href="/blob/2017-03-13-ide-sublime-lint-syntax-check/" rel="prev" title="IDE-Sublime lint 语法校验">
                  <i class="fa fa-chevron-left"></i> IDE-Sublime lint 语法校验
                </a>
              </div>
              <div class="post-nav-item">
                <a href="/blob/2017-03-15-ide-sublime-lint-jshint-msg/" rel="next" title="IDE-Sublime lint-JSHint MSG">
                  IDE-Sublime lint-JSHint MSG <i class="fa fa-chevron-right"></i>
                </a>
              </div>
            </div>
          </footer>
        </article>
      </div>







      <script>
        window.addEventListener('tabs:register', () => {
          let {
            activeClass
          } = CONFIG.comments;
          if (CONFIG.comments.storage) {
            activeClass = localStorage.getItem('comments_active') || activeClass;
          }
          if (activeClass) {
            const activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
            if (activeTab) {
              activeTab.click();
            }
          }
        });
        if (CONFIG.comments.storage) {
          window.addEventListener('tabs:click', event => {
            if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
            const commentClass = event.target.classList[1];
            localStorage.setItem('comments_active', commentClass);
          });
        }
      </script>
    </div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


      <div class="copyright">
        &copy;
        <span itemprop="copyrightYear">2021</span>
        <span class="with-love">
          <i class="fa fa-heart"></i>
        </span>
        <span class="author" itemprop="copyrightHolder">holidaypenguin</span>
      </div>
      <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/mist/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
      </div>

    </div>
  </footer>


  <script size="300" alpha="0.1" zIndex="-1" src="https://cdn.jsdelivr.net/npm/ribbon.js@1.0.2/dist/ribbon.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js"></script>
  <script src="/js/love.js"></script>

  <script src="/js/development.js"></script>
  <script src="/js/utils.js"></script>
  <script src="/js/motion.js"></script>
  <script src="/js/schemes/muse.js"></script>
  <script src="/js/next-boot.js"></script>


  <script src="/js/local-search.js"></script>









  <script>
    (function() {
      function leancloudSelector(url) {
        url = encodeURI(url);
        return document.getElementById(url).querySelector('.leancloud-visitors-count');
      }

      function addCount(Counter) {
        const visitors = document.querySelector('.leancloud_visitors');
        const url = decodeURI(visitors.id);
        const title = visitors.dataset.flagTitle;

        Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({
            url
          })))
          .then(response => response.json())
          .then(({
            results
          }) => {
            if (results.length > 0) {
              const counter = results[0];
              leancloudSelector(url).innerText = counter.time + 1;
              Counter('put', '/classes/Counter/' + counter.objectId, {
                  time: {
                    '__op': 'Increment',
                    'amount': 1
                  }
                })
                .catch(error => {
                  console.error('Failed to save visitor count', error);
                });
            } else {
              Counter('post', '/classes/Counter', {
                  title,
                  url,
                  time: 1
                })
                .then(response => response.json())
                .then(() => {
                  leancloudSelector(url).innerText = 1;
                })
                .catch(error => {
                  console.error('Failed to create', error);
                });
            }
          })
          .catch(error => {
            console.error('LeanCloud Counter Error', error);
          });
      }

      function showTime(Counter) {
        const visitors = document.querySelectorAll('.leancloud_visitors');
        const entries = [...visitors].map(element => {
          return decodeURI(element.id);
        });

        Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({
            url: {
              '$in': entries
            }
          })))
          .then(response => response.json())
          .then(({
            results
          }) => {
            for (let url of entries) {
              const target = results.find(item => item.url === url);
              leancloudSelector(url).innerText = target ? target.time : 0;
            }
          })
          .catch(error => {
            console.error('LeanCloud Counter Error', error);
          });
      }

      const {
        app_id,
        app_key,
        server_url
      } = {
        "enable": true,
        "app_id": "povuqNsSqFodlakVIwtEX5kb-gzGzoHsz",
        "app_key": "zXD40RDtDB3DMtpC89k0AK7g",
        "server_url": null,
        "security": false
      };

      function fetchData(api_server) {
        const Counter = (method, url, data) => {
          return fetch(`${api_server}/1.1${url}`, {
            method,
            headers: {
              'X-LC-Id': app_id,
              'X-LC-Key': app_key,
              'Content-Type': 'application/json',
            },
            body: JSON.stringify(data)
          });
        };
        if (CONFIG.page.isPost) {
          if (CONFIG.hostname !== location.hostname) return;
          addCount(Counter);
        } else if (document.querySelectorAll('.post-title-link').length >= 1) {
          showTime(Counter);
        }
      }

      const api_server = app_id.slice(-9) === '-MdYXbMMI' ? `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com` : server_url;

      if (api_server) {
        fetchData(api_server);
      } else {
        fetch('https://app-router.leancloud.cn/2/route?appId=' + app_id)
          .then(response => response.json())
          .then(({
            api_server
          }) => {
            fetchData('https://' + api_server);
          });
      }
    })();
  </script>



<script>
            window.imageLazyLoadSetting = {
                isSPA: false,
                preloadRatio: 1,
                processImages: null,
            };
        </script><script>window.addEventListener("load",function(){var t=/\.(gif|jpg|jpeg|tiff|png)$/i,r=/^data:image\/[a-z]+;base64,/;Array.prototype.slice.call(document.querySelectorAll("img[data-original]")).forEach(function(a){var e=a.parentNode;"A"===e.tagName&&(e.href.match(t)||e.href.match(r))&&(e.href=a.dataset.original)})});</script><script>!function(n){n.imageLazyLoadSetting.processImages=o;var e=n.imageLazyLoadSetting.isSPA,i=n.imageLazyLoadSetting.preloadRatio||1,r=Array.prototype.slice.call(document.querySelectorAll("img[data-original]"));function o(){e&&(r=Array.prototype.slice.call(document.querySelectorAll("img[data-original]")));for(var t,a=0;a<r.length;a++)0<=(t=(t=r[a]).getBoundingClientRect()).bottom&&0<=t.left&&t.top<=(n.innerHeight*i||document.documentElement.clientHeight*i)&&function(){var t,e,n,i,o=r[a];t=o,e=function(){r=r.filter(function(t){return o!==t})},n=new Image,i=t.getAttribute("data-original"),n.onload=function(){t.src=i,e&&e()},t.src!==i&&(n.src=i)}()}o(),n.addEventListener("scroll",function(){var t,e;t=o,e=n,clearTimeout(t.tId),t.tId=setTimeout(function(){t.call(e)},500)})}(this);</script></body>

</html>